#define _CRT_SECURE_NO_WARNINGS 1
void _GetNumberOfK(int* data, int left, int right, int k, int* count)
{
    if (left > right)
    {
        return;
    }
    int middle = (left + right) / 2;
    _GetNumberOfK(data, left, middle - 1, k, count);
    _GetNumberOfK(data, middle + 1, right, k, count);
    if (data[middle] == k)
    {
        (*count)++;
    }
}
int GetNumberOfK(int* data, int dataLen, int k) {
    int left = 0;
    int right = dataLen - 1;
    int count = 0;
    _GetNumberOfK(data, left, right, k, &count);
    return count;
}